<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>

<input id="ctl00_ToolkitScriptManager1_HiddenField" type="hidden">

<div class="with-head">
	<div class="with-padding" style="height: 100%; overflow: auto; color: Black;">		
		<div>
			<div class="block-border" style="background-color: #efefef;">
				<form:form action="saveSchoolSessionDetails.ems" method="POST" commandName="sessionPeriodGradeAssembler">
					<div class="block-content">
						<h1>
							Manage School Sessions/Grading Rules/Marking Periods
						</h1>
						<div class="block-controls">
							<ul class="controls-tabs same-height with-children-tip">
								<li>
									<a> 
										<input title="Add" src="users.aspx_files/add.png" style="border-width: 0px;" type="image"> 
									</a>
								</li>
								<li class="current">
									<a> 
										<input title="Edit" src="users.aspx_files/edit.png" style="border-width: 0px;" type="image"> 
									</a>
								</li>
							</ul>
						</div>
						<br>
						<fieldset class="grey-bg">
							<legend>
								<a href="#">Please Select </a>
							</legend>
							<div class="float-left gutter-right">
								<span class="label">School</span>
								<select id="schoolSelectBoxId" name="schoolId">
									<c:forEach var="school" items="${schoolList}">
										<option value="${school.schoolId}">
											${school.schoolName}
										</option>
									</c:forEach>
								</select>	
							</div>
							<div class="float-left gutter-right">
								<span class="label">Session</span>
								<select id="sessionSelectBoxId" name="sessionId">
									<c:forEach var="session" items="${sessionList}">
										<option value="${session.sessionId}">
											${session.sessionName}
										</option>
									</c:forEach>
								</select>								
							</div>
							<div class="float-left gutter-right">
								<span class="label">&nbsp;&nbsp;</span>
								<input value="Edit" class="button" type="button" onclick="">
							</div>
						</fieldset>
						<div>
							<div class="box" style="overflow: auto">
								<p class="mini-infos">
									<strong>
										<span>
											Please enter the details below to add user:
										</span> 
									</strong>
								</p>
								<div id="ctl00_ContentPlaceHolder2_TabContainer1" class="ajax__tab_yuitabview-theme ajax__tab_container ajax__tab_default"
									style="visibility: visible;">
									<div class="ajax__tab_header" id="ctl00_ContentPlaceHolder2_TabContainer1_header">
										<span class="ajax__tab_active" id="ctl00_ContentPlaceHolder2_TabContainer1_TabPanel6_tab">
											<span class="ajax__tab_outer"> 
												<span class="ajax__tab_inner"> 
													<span class="ajax__tab_tab" id="__tab_ctl00_ContentPlaceHolder2_TabContainer1_TabPanel6">
														Sessions 
													</span> 
												</span> 
											</span> 
										</span>
										<span class="" id="ctl00_ContentPlaceHolder2_TabContainer1_TabPanel1_tab">
											<span class="ajax__tab_outer"> 
												<span class="ajax__tab_inner"> 
													<span class="ajax__tab_tab" id="__tab_ctl00_ContentPlaceHolder2_TabContainer1_TabPanel1">
														Marking Periods
													</span> 
												</span> 
											</span> 
										</span>
										<span class="" id="ctl00_ContentPlaceHolder2_TabContainer1_TabPanel3_tab">
											<span class="ajax__tab_outer"> 
												<span class="ajax__tab_inner"> 
													<span class="ajax__tab_tab" id="__tab_ctl00_ContentPlaceHolder2_TabContainer1_TabPanel3">
														Grading Rules 
													</span> 
												</span> 
											</span> 
										</span>										
									</div>
									<div class="ajax__tab_body" id="ctl00_ContentPlaceHolder2_TabContainer1_body">
										<div style="visibility: visible;" id="ctl00_ContentPlaceHolder2_TabContainer1_TabPanel6" class="ajax__tab_panel">
											<table width="100%">
												<tbody>
													<tr>
														<td>
															<span id="ctl00_ContentPlaceHolder2_TabContainer1_TabPanel1_lblHeading" style="font-weight: 700">
																Please fill the details below to Add School Session
															</span>
														</td>
														<td align="right">
															<a title="Add" href="${contextPath}/setupPositionForm.ems" style="border-width: 0px;">
																<img src="${imagePath}/add.png"> 
															</a>												
															&nbsp;
															<a title="Edit" href="javascript:getPositionDetails('${applicationScope.contextPath}','positionSelectBoxId')" style="border-width: 0px;">
																<img src="${imagePath}/edit.png"> 
															</a>
															&nbsp;
															<a title="View" href="javascript:getPositionDetails('${applicationScope.contextPath}','positionSelectBoxId')" style="border-width: 0px;">
																<img src="${imagePath}/view.png"> 
															</a>												
															&nbsp;
															<a title="View" href="javascript:getPositionDetails('${applicationScope.contextPath}','positionSelectBoxId')" style="border-width: 0px;">
																<img src="${imagePath}/view.png"> 
															</a>												
														</td>
													</tr>
												</tbody>
											</table>
											<table class="table" width="100%">
												<tbody>
													<tr>
														<td>
															Session Name
														</td>
														<td colspan="2">
															<form:input path="session.sessionName" maxlength="50" cssClass="tbox" cssStyle="width: 200px;" />												
														</td>
													</tr>
													<tr>
														<td class="style2">
															Status
														</td>
														<td colspan="2">
															<table border="0">
																<tbody>
																	<tr>
																		<td>
																			<form:radiobutton id="status_true" path="session.status" value="true"/>																
																			<label for="status_true">
																				OPEN
																			</label>
																		</td>
																		<td>
																			<form:radiobutton id="status_false" path="session.status" value="false"/>																
																			<label for="status_false">
																				CLOSED
																			</label>
																		</td>
																	</tr>
																</tbody>
															</table>
														</td>
													</tr>
													<tr>
														<td class="style2">
															Start Date&nbsp;
														</td>
														<td colspan="2">
															<div class="calendarContainer">
																<form:input path="session.stateDate" maxlength="50" cssClass="tbox" cssStyle="width: 100px;" />
															</div>
														</td>
													</tr>
													<tr>
														<td class="style2">
															End Date
														</td>
														<td colspan="2">
															<div class="calendarContainer">
																<form:input path="session.endDate" maxlength="20" cssClass="tbox" cssStyle="width: 100px;" />
															</div>
														</td>
													</tr>
													<tr>
														<td class="style2">
															&nbsp;
														</td>
														<td colspan="2">												
															<input value="Save" class="addbut" type="submit">
														</td>
													</tr>
												</tbody>
											</table>
										</div>
										<div id="ctl00_ContentPlaceHolder2_TabContainer1_TabPanel1" class="ajax__tab_panel"
											style="visibility: hidden; display: none;">
											<table width="100%" border="0" cellpadding="3" cellspacing="1">
												<tbody>
													<tr>
														<td style="font-weight: bold;" align="center">
															Manage Marking Periods
														</td>
													</tr>
													<tr>
														<td>												
															<table rules="all" style="background-color: rgb(239, 239, 239); border-color: Silver; border-width: 1px; border-style: solid; width: 100%; border-collapse: collapse;"
																   align="Left" border="1" cellpadding="2" cellspacing="0">
																<tbody>
																	<tr class="dghead" style="color: White; background-color: LightSteelBlue;">
																		<td>
																			Marking Period Title
																		</td>
																		<td>
																			From
																		</td>
																		<td>
																			To
																		</td>
																		<td>
																			Edit
																		</td>
																		<td>
																			Delete
																		</td>
																	</tr>
																	<tr>
																		<td>
																			<form:input path="markingPeriodList[0].markingPeriodTitle" maxlength="50" />																
																		</td>
																		<td>
																			<div class="calendarContainer">
																				<form:input path="markingPeriodList[0].markingPeriodStartDate" maxlength="10" />																	
																			</div>
																		</td>
																		<td>
																			<div class="calendarContainer">
																				<form:input path="markingPeriodList[0].markingPeriodEndDate" maxlength="10" />
																			</div>
																		</td>
																		<td>
																			<a title="Edit" href="javascript:" style="border-width: 0px;">
																				<img src="${imagePath}/edit.png"> 
																			</a>
																		</td>
																		<td>
																			<a title="Edit" href="javascript:" style="border-width: 0px;">
																				<img src="${imagePath}/add.png"> 
																			</a>
																		</td>
																	</tr>
																</tbody>
															</table>												
														</td>
													</tr>
												</tbody>
											</table>
										</div>
										<div id="ctl00_ContentPlaceHolder2_TabContainer1_TabPanel3" class="ajax__tab_panel"
											style="visibility: hidden; display: none;">
											<table class="gentxt" width="100%" border="0" cellpadding="0" cellspacing="0">
												<tbody>
													<tr>
														<td>
															&nbsp;
														</td>
														<td class="gentxt" colspan="2" valign="top">
															<div id="ctl00_ContentPlaceHolder2_TabContainer1_TabPanel3_PanelAdd">
																<table class="desc" width="100%" bgcolor="#efefef" border="0" cellpadding="3" cellspacing="1">
																	<tbody>
																		<tr>
																			<td>
																				<span class="heading" style="font-weight: bold;">
																					Manage Grading Rules
																				</span>
																			</td>
																		</tr>
																		<tr>
																			<td>
																				<table class="gentxt" width="100%" bgcolor="#efefef" border="0" cellpadding="3" cellspacing="1">
																					<tbody>
																						<tr bgcolor="#ffffff">
																							<td>
																								<table rules="all" style="background-color: rgb(239, 239, 239); border-color: Silver; border-width: 1px; border-style: solid; width: 100%; border-collapse: collapse;"
																									   align="Left" border="1" cellpadding="2" cellspacing="0">
																									<tbody>
																										<tr class="dghead" style="color: White; background-color: LightSteelBlue;">
																											<td>
																												From Marks
																											</td>
																											<td>
																												To Marks
																											</td>
																											<td>
																												Grade
																											</td>
																											<td>
																												Edit
																											</td>
																											<td>
																												Delete
																											</td>
																										</tr>
																										<tr>
																											<td>
																												<form:input path="gradingRuleList[0].fromMarks" />																																																	
																												<span style="color: Red; display: none;">
																													From Marks is required
																												</span>
																												<span style="color: Red; display: none;">
																													Enter values between 1 - 100
																												</span>
																											</td>
																											<td>
																												<form:input path="gradingRuleList[0].toMarks" />
																												<span style="color: Red; display: none;">
																													To Marks is required
																												</span>
																												<span style="color: Red; display: none;">
																													Enter values between 1 - 100
																												</span>
																											</td>
																											<td>
																												<form:input path="gradingRuleList[0].grade" maxlength="50" cssStyle="width: 100px;" />																									
																												<span style="color: Red; display: none;">
																													Grade is required
																												</span>
																											</td>
																											<td>
																												<a title="Edit" href="javascript:" style="border-width: 0px;">
																													<img src="${imagePath}/edit.png"> 
																												</a>
																											</td>
																											<td>
																												<a title="Edit" href="javascript:" style="border-width: 0px;">
																													<img src="${imagePath}/add.png"> 
																												</a>
																											</td>
																										</tr>
																									</tbody>
																								</table>
																							</td>
																						</tr>
																					</tbody>
																				</table>
																			</td>
																		</tr>
																	</tbody>
																</table>
															</div>
														</td>
														<td>
															&nbsp;
														</td>
													</tr>
												</tbody>
											</table>
										</div>										
									</div>
								</div>
								<br>
								<input name="ctl00$ContentPlaceHolder2$btnAdd" value="Save" class="button" type="submit">
								&nbsp; &nbsp;
								<div style="color: Red; display: none;">
								</div>
							</div>
						</div>
					</div>
				</form:form>
			</div>
		</div>
	</div>
</div>


<script type="text/javascript">
//<![CDATA[
Sys.Application.add_init(function() {
    $create(Sys.Extended.UI.TabPanel, {"headerTab":$get("__tab_ctl00_ContentPlaceHolder2_TabContainer1_TabPanel6"),"ownerID":"ctl00_ContentPlaceHolder2_TabContainer1"}, null, {"owner":"ctl00_ContentPlaceHolder2_TabContainer1"}, $get("ctl00_ContentPlaceHolder2_TabContainer1_TabPanel6"));
});
Sys.Application.add_init(function() {
    $create(Sys.Extended.UI.TabPanel, {"headerTab":$get("__tab_ctl00_ContentPlaceHolder2_TabContainer1_TabPanel1"),"ownerID":"ctl00_ContentPlaceHolder2_TabContainer1"}, null, {"owner":"ctl00_ContentPlaceHolder2_TabContainer1"}, $get("ctl00_ContentPlaceHolder2_TabContainer1_TabPanel1"));
});
Sys.Application.add_init(function() {
    $create(Sys.Extended.UI.TabPanel, {"headerTab":$get("__tab_ctl00_ContentPlaceHolder2_TabContainer1_TabPanel3"),"ownerID":"ctl00_ContentPlaceHolder2_TabContainer1"}, null, {"owner":"ctl00_ContentPlaceHolder2_TabContainer1"}, $get("ctl00_ContentPlaceHolder2_TabContainer1_TabPanel3"));
});
Sys.Application.add_init(function() {
    $create(Sys.Extended.UI.TabContainer, {"activeTabIndex":0,"clientStateField":$get("ctl00_ContentPlaceHolder2_TabContainer1_ClientState")}, null, null, $get("ctl00_ContentPlaceHolder2_TabContainer1"));
});
//]]>
</script>